package com.gjy.spring.b01;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-12-18 16:00:25
 */
@ComponentScan
public class FTest {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(FTest.class);
        Bean1 bean1 = context.getBean("bean1", Bean1.class);

        System.out.println(bean1);
        System.out.println(context.getBean(Bean1FactoryBean.class));
        System.out.println(context.getBean("&bean1"));
        context.close();
    }
}
